import request from '@/utils/request'

// 查询商家列表
export function listBusiness(query) {
  return request({
    url: '/scancode/business/list',
    method: 'get',
    params: query
  })
}

// 查询商家详细
export function getBusiness(id) {
  return request({
    url: '/scancode/business/getInfo/' + id,
    method: 'get'
  })
}

// 新增商家
export function addBusiness(data) {
  return request({
    url: '/scancode/business',
    method: 'post',
    data: data
  })
}

// 修改商家
export function updateBusiness(data) {
  return request({
    url: '/scancode/business/edit',
    method: 'post',
    data: data
  })
}

// 删除商家
export function delBusiness(id) {
  return request({
    url: '/scancode/business/del/' + id,
    method: 'post'
  })
}

// 导出商家
export function exportBusiness(query) {
  return request({
    url: '/scancode/business/export',
    method: 'get',
    params: query
  })
}
